
#include"global.h"
#include <QImage>

VideoControl* framecontrol;

rd_addr readtemp[2];

int fd;
int testfd;
struct v4l2_requestbuffers reqbuf;
struct v4l2_buffer buf;

//IplImage* iplImage;
IplImage* iplImage_resize;
IplImage* IM_show[BUFFER_COUNT];

int tx_id;
int test_img_id;

vdma_handle vdma0;
vdma_handle vdma1;
vdma_handle vdma2;

fb_addr fbaddr0[BUFFER_COUNT];
fb_addr fbaddr1[BUFFER_COUNT];
fb_addr fbaddr2[BUFFER_COUNT];
fb_addr fbaddr3[BUFFER_COUNT];

XCvt_resize Cvt_resize;

VideoBuffer* framebuf;

QImage qqimage[BUFFER_COUNT];

int loop_id(int i)
{
    int id;
    if(i==(BUFFER_COUNT-1)){
        id = 0;
    }
    else{
        id = i+1;
    }
    return id;
}

int shownum_temp = 0;
